/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Crimson Text', serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #f0f0f0;
    overflow-x: hidden;
    min-height: 100vh;
}

.hidden {
    display: none !important;
}

/* 欢迎页面样式 */
.welcome-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5)), 
                url('图纸/封面壁纸1.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    cursor: crosshair; /* 显示十字光标提示可以点击 */
    transition: background-image 1s ease-in-out;
}

/* 基础模态框样式（用于咒语/图纸） */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1500;
}

.modal-content {
    background: linear-gradient(145deg, #2c1810, #4a2c1a);
    border: 3px solid #d4af37;
    border-radius: 16px;
    padding: 20px;
    max-width: 900px;
    width: 90%;
    max-height: 85vh;
    overflow: auto;
    box-shadow: 0 0 40px rgba(212,175,55,0.4);
}

.welcome-content {
    background: linear-gradient(145deg, #2c1810 0%, #4a2c1a 50%, #8b4513 100%);
    border: 3px solid #d4af37;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 600px;
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.5);
    animation: modalAppear 1s ease-out;
    position: relative;
    z-index: 1001;
}

/* 倒计时样式 */
.countdown-container {
    position: absolute;
    top: 30px;
    left: 30px;
    background: linear-gradient(145deg, rgba(44, 24, 16, 0.9), rgba(74, 44, 26, 0.9));
    border: 3px solid #d4af37;
    border-radius: 15px;
    padding: 20px;
    z-index: 1001;
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
    backdrop-filter: blur(10px);
}

.countdown-title {
    color: #d4af37;
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.6);
}

.countdown-timer {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 50px;
}

.countdown-number {
    background: linear-gradient(145deg, #d4af37, #ffd700);
    color: #2c1810;
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
    min-width: 40px;
    text-align: center;
}

.countdown-label {
    color: #f0f0f0;
    font-size: 0.9rem;
    margin-top: 5px;
    font-weight: bold;
}

/* 烟花特效容器 */
.fireworks-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1002;
}

/* 烟花粒子样式 */
.firework-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    pointer-events: none;
    animation: fireworkExplode 1.5s ease-out forwards;
}

@keyframes fireworkExplode {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: scale(1) translate(var(--dx), var(--dy));
        opacity: 0;
    }
}

/* 分院按钮容器 */
.sorting-button-container {
    position: absolute;
    bottom: 30px;
    right: 30px;
    z-index: 1001;
}

.sorting-button {
    background: linear-gradient(145deg, #d4af37, #ffd700);
    border: 3px solid #2c1810;
    border-radius: 15px;
    padding: 15px 25px;
    color: #2c1810;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.sorting-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6);
    background: linear-gradient(145deg, #ffd700, #d4af37);
}

.sorting-icon {
    font-size: 20px;
}

.sorting-text {
    font-family: 'Cinzel', serif;
}

/* 魔杖按钮容器 */
.wand-button-container {
    position: absolute;
    bottom: 30px;
    left: 30px;
    z-index: 1001;
}

.wand-button {
    background: linear-gradient(145deg, #2c1810, #8b4513);
    border: 3px solid #d4af37;
    border-radius: 15px;
    padding: 15px 25px;
    color: #d4af37;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.4);
}

.wand-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.6);
    background: linear-gradient(145deg, #8b4513, #2c1810);
}

.wand-icon {
    font-size: 20px;
}

.wand-text {
    font-family: 'Cinzel', serif;
}

/* 分院页面样式 */
.sorting-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1500;
    overflow-y: auto;
}

.sorting-content {
    background: linear-gradient(145deg, #2c1810, #4a2c1a);
    border: 3px solid #d4af37;
    border-radius: 20px;
    padding: 40px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.5);
    animation: modalAppear 1s ease-out;
}

.sorting-header {
    text-align: center;
    margin-bottom: 30px;
}

.sorting-header h1 {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    color: #d4af37;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.8);
}

.sorting-header p {
    color: #f0f0f0;
    font-size: 1.1rem;
}

.sorting-hat-container {
    text-align: center;
    margin: 30px 0;
}

.sorting-hat {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: hatFloat 3s ease-in-out infinite alternate;
}

@keyframes hatFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.sorting-message {
    color: #f0f0f0;
    font-size: 1.2rem;
    font-style: italic;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

.sorting-questions {
    margin: 30px 0;
}

.question-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
}

.question-container h3 {
    color: #d4af37;
    font-size: 1.3rem;
    margin-bottom: 20px;
    text-align: center;
}

.answer-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.answer-option {
    background: linear-gradient(145deg, #4a2c1a, #8b4513);
    border: 2px solid #d4af37;
    border-radius: 10px;
    padding: 15px 20px;
    color: #f0f0f0;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.answer-option:hover {
    background: linear-gradient(145deg, #8b4513, #d4af37);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.sorting-result {
    text-align: center;
    margin: 30px 0;
}

.house-result h2 {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    color: #d4af37;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.8);
}

.house-crest-large {
    font-size: 5rem;
    margin: 20px 0;
    animation: crestGlow 2s ease-in-out infinite alternate;
}

@keyframes crestGlow {
    from { filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.5)); }
    to { filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.8)); }
}

.house-result p {
    color: #f0f0f0;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.house-traits {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
}

.house-traits h3 {
    color: #d4af37;
    margin-bottom: 15px;
}

.house-traits ul {
    list-style: none;
    padding: 0;
}

.house-traits li {
    color: #f0f0f0;
    padding: 8px 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.house-traits li:last-child {
    border-bottom: none;
}

.sorting-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.sorting-action-btn {
    background: linear-gradient(145deg, #d4af37, #ffd700);
    border: 2px solid #2c1810;
    border-radius: 10px;
    padding: 12px 25px;
    color: #2c1810;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sorting-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.sorting-action-btn.secondary {
    background: linear-gradient(145deg, #4a2c1a, #8b4513);
    color: #f0f0f0;
    border-color: #d4af37;
}

.sorting-action-btn.secondary:hover {
    background: linear-gradient(145deg, #8b4513, #d4af37);
}

/* 魔杖页面样式 */
.wand-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1500;
    overflow-y: auto;
}

.wand-content {
    background: linear-gradient(145deg, #2c1810, #4a2c1a);
    border: 3px solid #d4af37;
    border-radius: 20px;
    padding: 40px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.5);
    animation: modalAppear 1s ease-out;
}

.wand-header {
    text-align: center;
    margin-bottom: 30px;
}

.wand-header h1 {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    color: #d4af37;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.8);
}

.wand-header p {
    color: #f0f0f0;
    font-size: 1.1rem;
}

.wand-shop-container {
    text-align: center;
    margin: 30px 0;
}

.wand-shop {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: shopFloat 3s ease-in-out infinite;
}

@keyframes shopFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.wand-message {
    color: #f0f0f0;
    font-size: 1.2rem;
    margin-bottom: 20px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wand-questions {
    margin: 30px 0;
}

.wand-result {
    text-align: center;
    margin: 30px 0;
}

.wand-result-content {
    background: rgba(212, 175, 55, 0.1);
    border: 2px solid #d4af37;
    border-radius: 15px;
    padding: 30px;
    margin: 20px 0;
}

.wand-result-content h2 {
    color: #d4af37;
    font-size: 2rem;
    margin-bottom: 20px;
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.6);
}

.wand-image {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    background: url('图纸/魔法物品/魔杖.jpg') center/cover;
    border-radius: 10px;
    border: 3px solid #d4af37;
}

.wand-details {
    text-align: left;
    margin: 20px 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.wand-details p {
    color: #f0f0f0;
    font-size: 1.1rem;
    margin: 10px 0;
    padding: 5px 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.wand-details p:last-child {
    border-bottom: none;
}

.wand-description {
    color: #f0f0f0;
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 20px 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.wand-traits {
    text-align: left;
    margin: 20px 0;
}

.wand-traits h3 {
    color: #d4af37;
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.wand-traits ul {
    list-style: none;
    padding: 0;
}

.wand-traits li {
    color: #f0f0f0;
    font-size: 1rem;
    margin: 8px 0;
    padding: 8px 15px;
    background: rgba(212, 175, 55, 0.1);
    border-left: 3px solid #d4af37;
    border-radius: 5px;
}

.wand-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.wand-action-btn {
    background: linear-gradient(145deg, #d4af37, #ffd700);
    border: 3px solid #2c1810;
    border-radius: 15px;
    padding: 15px 30px;
    color: #2c1810;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.wand-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6);
    background: linear-gradient(145deg, #ffd700, #d4af37);
}

.wand-action-btn.secondary {
    background: linear-gradient(145deg, #4a2c1a, #8b4513);
    color: #f0f0f0;
    border-color: #d4af37;
}

.wand-action-btn.secondary:hover {
    background: linear-gradient(145deg, #8b4513, #d4af37);
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.welcome-content h1 {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    color: #d4af37;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.8);
    margin-bottom: 20px;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 20px rgba(212, 175, 55, 0.8); }
    to { text-shadow: 0 0 30px rgba(212, 175, 55, 1), 0 0 40px rgba(212, 175, 55, 0.6); }
}

.house-crests {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
}

.crest {
    width: 80px;
    height: 80px;
    border-radius: 15px;
    border: 3px solid #d4af37;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
    position: relative;
    overflow: hidden;
    animation: float 3s ease-in-out infinite;
}

.crest:nth-child(1) { animation-delay: 0s; }
.crest:nth-child(2) { animation-delay: 0.5s; }
.crest:nth-child(3) { animation-delay: 1s; }
.crest:nth-child(4) { animation-delay: 1.5s; }

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.crest:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.6);
}

.crest::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(212, 175, 55, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.crest:hover::before {
    transform: translateX(100%);
}

.sticker1 {
    background-image: url('图纸/贴纸1.png');
}

.sticker2 {
    background-image: url('图纸/贴纸2.png');
}

.sticker3 {
    background-image: url('图纸/贴纸3.png');
}

.sticker4 {
    background-image: url('图纸/贴纸4.png');
    transform: translateX(10px);
}

.magic-button {
    background: linear-gradient(45deg, #d4af37, #ffd700);
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c1810;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

.magic-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
}

/* 音乐控制样式 */
.music-controls {
    margin: 20px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    border: 2px solid rgba(212, 175, 55, 0.3);
}

.music-btn {
    background: linear-gradient(45deg, #8b4513, #d4af37);
    border: none;
    padding: 12px 25px;
    font-size: 1.1rem;
    font-weight: bold;
    color: #2c1810;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    margin-bottom: 15px;
}

.music-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.volume-control label {
    color: #d4af37;
    font-weight: bold;
    font-size: 1rem;
}

.volume-control input[type="range"] {
    width: 120px;
    height: 6px;
    background: rgba(212, 175, 55, 0.3);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.volume-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #d4af37;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.volume-control input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #d4af37;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* 主应用界面 */
#mainApp {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* 工具栏样式 */
.toolbar {
    background: linear-gradient(90deg, #2c1810 0%, #4a2c1a 50%, #8b4513 100%);
    border-bottom: 3px solid #d4af37;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.toolbar-left .hogwarts-title h2 {
    font-family: 'Cinzel', serif;
    color: #d4af37;
    font-size: 1.5rem;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.toolbar-center {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.tool-group {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 10px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.tool-group label {
    font-weight: bold;
    color: #d4af37;
    white-space: nowrap;
}

.tool-btn {
    background: linear-gradient(45deg, #4a2c1a, #8b4513);
    border: 2px solid #d4af37;
    color: #f0f0f0;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.tool-btn:hover {
    background: linear-gradient(45deg, #8b4513, #d4af37);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.tool-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.tool-btn:disabled:hover {
    background: linear-gradient(45deg, #4a2c1a, #8b4513);
    transform: none;
    box-shadow: none;
}

/* 图片计数器样式 */
.image-counter {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: #f0f0f0;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.3s ease;
}

.image-counter:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: #d4af37;
}

.counter-icon {
    font-size: 16px;
}

.counter-text {
    color: #d4af37;
    font-weight: bold;
}

/* 颜色组样式 */
.color-group {
    position: relative;
    display: inline-block;
}

.color-dropdown {
    position: relative;
    display: inline-block;
}

.color-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: linear-gradient(145deg, #2c1810, #4a2c1a);
    border: 2px solid #d4af37;
    border-radius: 8px;
    min-width: 120px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    margin-top: 5px;
}

.color-dropdown-content.show {
    display: block;
}

.color-theme-option {
    padding: 10px 15px;
    color: #f0f0f0;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    white-space: nowrap;
}

.color-theme-option:last-child {
    border-bottom: none;
}

.color-theme-option:hover {
    background: linear-gradient(45deg, #8b4513, #d4af37);
    color: #2c1810;
}

.color-theme-option.active {
    background: linear-gradient(45deg, #d4af37, #ffd700);
    color: #2c1810;
    font-weight: bold;
}

.color-controls-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 5px 0;
}

.custom-color-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 3px solid #d4af37;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(145deg, #2c1810, #4a2c1a);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.custom-color-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

.color-preview {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: #000000;
}

.quick-colors {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
    max-width: 200px;
}

/* 自定义颜色圆盘 */
.color-wheel-container {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: linear-gradient(145deg, #2c1810, #4a2c1a);
    border: 3px solid #d4af37;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    margin-top: 10px;
}

.color-wheel-container.show {
    display: block;
}

.color-wheel {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: conic-gradient(
        #ff0000, #ff8000, #ffff00, #80ff00, 
        #00ff00, #00ff80, #00ffff, #0080ff,
        #0000ff, #8000ff, #ff00ff, #ff0080,
        #ff0000
    );
    position: relative;
    cursor: crosshair;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.color-wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 3px solid #d4af37;
}

.color-wheel-center input[type="color"] {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    background: none;
}

/* RGB输入区域样式 */
.rgb-input-container {
    margin-top: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.rgb-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.rgb-input-group:last-child {
    margin-bottom: 0;
}

.rgb-input-group label {
    color: #f0f0f0;
    font-size: 14px;
    font-weight: bold;
    min-width: 20px;
}

.rgb-input {
    width: 60px;
    height: 30px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #d4af37;
    border-radius: 5px;
    text-align: center;
    font-size: 14px;
    color: #2c1810;
    font-weight: bold;
}

.rgb-input:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.rgb-apply-btn {
    width: 100%;
    height: 35px;
    background: linear-gradient(45deg, #d4af37, #ffd700);
    border: none;
    border-radius: 8px;
    color: #2c1810;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.rgb-apply-btn:hover {
    background: linear-gradient(45deg, #ffd700, #d4af37);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.color-btn {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.color-btn:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

input[type="color"] {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

input[type="range"] {
    width: 100px;
    height: 6px;
    background: #4a2c1a;
    border-radius: 3px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: #d4af37;
    border-radius: 50%;
    cursor: pointer;
}

/* 主要内容区域 */
.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* 侧边栏 */
.sidebar {
    width: 250px;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    border-right: 2px solid #d4af37;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
}

/* 魔法装饰滚轮 - 改为垂直滚动列表 */
.magical-wheel {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
}

.wheel-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    animation: scrollUp 20s linear infinite;
}

.wheel-container:hover {
    animation-play-state: paused;
}

@keyframes scrollUp {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

.wheel-item {
    position: relative;
    width: 180px;
    height: 60px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.1), rgba(255, 215, 0, 0.05));
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.wheel-item:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.3), rgba(255, 215, 0, 0.2));
    z-index: 10;
}

.magical-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.5));
    margin-right: 12px;
}

.magical-text {
    color: #d4af37;
    font-weight: bold;
    font-size: 0.9rem;
    text-align: center;
    text-shadow: 0 0 3px rgba(212, 175, 55, 0.5);
}

/* 复制wheel-item用于无缝滚动 */
.wheel-container::after {
    content: '';
    display: block;
    height: 15px;
}

.camera-section h3 {
    color: #d4af37;
    margin-bottom: 15px;
    text-align: center;
    font-family: 'Cinzel', serif;
}

#camera {
    width: 100%;
    height: 200px;
    border: 2px solid #d4af37;
    border-radius: 10px;
    background: #000;
    margin-bottom: 15px;
}

.hand-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.camera-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control-btn {
    background: linear-gradient(45deg, #4a2c1a, #8b4513);
    border: 2px solid #d4af37;
    color: #f0f0f0;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.control-btn:hover {
    background: linear-gradient(45deg, #8b4513, #d4af37);
}

/* 画布区域 */
.canvas-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 100%);
    position: relative;
    padding: 20px;
    padding-bottom: 80px; /* 为设置按钮留出空间 */
}

.canvas-header {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.painting-mode-indicator {
    background: linear-gradient(45deg, #4a2c1a, #8b4513);
    border: 2px solid #d4af37;
    color: #f0f0f0;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.painting-mode-indicator.active {
    background: linear-gradient(45deg, #2a623d, #4a2c1a);
    border-color: #00ff00;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
}

#drawingCanvas {
    border: 3px solid #d4af37;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
    cursor: crosshair;
    max-width: 100%;
    max-height: 100%;
}

/* 标签1样式 */
.sticker-label {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 100;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    border: 2px solid #d4af37;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.sticker-label:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

.sticker-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: rgba(212, 175, 55, 0.1);
}

.canvas-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
}

.voice-indicator {
    background: rgba(255, 0, 0, 0.8);
    color: #ffffff;
    padding: 10px 15px;
    border-radius: 20px;
    border: 2px solid #ff0000;
    font-weight: bold;
    animation: pulse 1s ease-in-out infinite alternate;
}

@keyframes pulse {
    from { opacity: 0.7; }
    to { opacity: 1; }
}

/* 咒语手册弹窗 */
.spells-content {
    max-width: 900px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #d4af37;
}

.modal-header h2 {
    color: #d4af37;
    font-family: 'Cinzel', serif;
}

.close-btn {
    background: none;
    border: none;
    color: #d4af37;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(212, 175, 55, 0.2);
}

.spells-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* 调整咒语卡片布局，为详细信息按钮留出空间 */
.spell-card {
    background: linear-gradient(145deg, #2c1810, #4a2c1a);
    border: 2px solid #d4af37;
    border-radius: 15px;
    padding: 20px;
    padding-top: 50px; /* 为顶部按钮留出空间 */
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 180px; /* 确保最小高度 */
}

.spell-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
}

.spell-card.forbidden {
    border-color: #ff0000;
    background: linear-gradient(145deg, #2c1810, #4a0000);
}

.spell-card.forbidden:hover {
    box-shadow: 0 10px 30px rgba(255, 0, 0, 0.3);
}

.spell-name {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    color: #d4af37;
    margin-bottom: 10px;
}

.spell-card.forbidden .spell-name {
    color: #ff6666;
}

.spell-pronunciation {
    font-style: italic;
    color: #ccc;
    margin-bottom: 10px;
}

.spell-description {
    color: #f0f0f0;
    line-height: 1.5;
}

.spell-info-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(212, 175, 55, 0.2);
    border: 1px solid #d4af37;
    color: #d4af37;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.spell-info-btn:hover {
    background: rgba(212, 175, 55, 0.4);
}

/* 图纸库弹窗 */
.templates-content {
    max-width: 1000px;
    max-height: 80vh;
    overflow-y: auto;
}

.templates-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.category {
    background: linear-gradient(145deg, #2c1810, #4a2c1a);
    border: 2px solid #d4af37;
    border-radius: 15px;
    padding: 20px;
}

.category-title {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: #d4af37;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
    padding-bottom: 10px;
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    max-height: 500px;
    overflow: visible;
    transition: max-height 0.5s ease;
}

.templates-grid.expanded {
    max-height: 500px;
}

.template-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.template-item:hover {
    background: rgba(212, 175, 55, 0.2);
    transform: scale(1.05);
}

.template-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.template-name {
    color: #f0f0f0;
    font-weight: bold;
}

/* 咒语特效容器 */
.spell-effects-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

.spell-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    animation: spellEffect 3s ease-out forwards;
}

@keyframes spellEffect {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
    100% {
        opacity: 0;
        transform: scale(1.5);
    }
}

/* 帮助按钮 */
.help-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, #d4af37, #ffd700);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    font-size: 1.2rem;
}

.help-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

/* 音频按钮 */
.audio-btn {
    position: absolute;
    bottom: 90px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #d4af37, #ffd700);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    font-size: 1.5rem;
}

.audio-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

.audio-btn.playing {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 音频控制面板 */
.audio-control-panel {
    position: absolute;
    bottom: 160px;
    right: 20px;
    background: linear-gradient(145deg, #2c1810, #4a2c1a);
    border: 3px solid #d4af37;
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    min-width: 200px;
}

.audio-control-panel.show {
    display: block;
}

.audio-control-panel h4 {
    color: #d4af37;
    margin: 0 0 10px 0;
    text-align: center;
    font-family: 'Cinzel', serif;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.volume-control label {
    color: #f0f0f0;
    font-size: 12px;
    min-width: 40px;
}

.volume-control input[type="range"] {
    flex: 1;
    height: 6px;
    background: #4a2c1a;
    border-radius: 3px;
    outline: none;
}

.volume-control input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background: #d4af37;
    border-radius: 50%;
    cursor: pointer;
}

.volume-control span {
    color: #f0f0f0;
    font-size: 12px;
    min-width: 30px;
    text-align: center;
}

.audio-toggle-btn {
    width: 100%;
    height: 35px;
    background: linear-gradient(45deg, #d4af37, #ffd700);
    border: none;
    border-radius: 8px;
    color: #2c1810;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.audio-toggle-btn:hover {
    background: linear-gradient(45deg, #ffd700, #d4af37);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.audio-toggle-btn.playing {
    background: linear-gradient(45deg, #4CAF50, #45a049);
}

/* 帮助教程弹窗样式 */
.help-content {
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
}

.help-content-body {
    padding: 20px 0;
}

.help-section {
    margin-bottom: 30px;
}

.help-section h3 {
    color: #d4af37;
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    margin-bottom: 15px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
    padding-bottom: 8px;
}

.help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.help-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    transition: all 0.3s ease;
}

.help-item:hover {
    background: rgba(212, 175, 55, 0.1);
    transform: translateY(-2px);
}

.help-icon {
    font-size: 2rem;
    min-width: 50px;
    text-align: center;
}

.help-text {
    color: #f0f0f0;
    line-height: 1.4;
}

.help-text strong {
    color: #d4af37;
}

.help-steps {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.help-step {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border-left: 4px solid #d4af37;
}

.step-number {
    width: 35px;
    height: 35px;
    background: linear-gradient(45deg, #d4af37, #ffd700);
    color: #2c1810;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.step-content {
    color: #f0f0f0;
    line-height: 1.4;
}

.step-content strong {
    color: #d4af37;
}

.help-shortcuts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.shortcut-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.shortcut-key {
    background: linear-gradient(45deg, #d4af37, #ffd700);
    color: #2c1810;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.9rem;
}

.shortcut-desc {
    color: #f0f0f0;
    font-size: 0.9rem;
}

.help-tips {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tip-item {
    padding: 12px 15px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 8px;
    border-left: 4px solid #d4af37;
    color: #f0f0f0;
    line-height: 1.4;
}

/* 设置按钮 */
.settings-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #d4af37, #ffd700);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    font-size: 1.5rem;
}

.settings-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

/* 设置面板 */
.settings-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(10px);
}

.settings-content {
    background: linear-gradient(145deg, #2c1810, #4a2c1a);
    border: 3px solid #d4af37;
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.5);
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #d4af37;
}

.settings-header h3 {
    color: #d4af37;
    font-family: 'Cinzel', serif;
    margin: 0;
}

.setting-group {
    margin-bottom: 25px;
}

.setting-group h4 {
    color: #d4af37;
    margin-bottom: 15px;
    font-family: 'Cinzel', serif;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.setting-item label {
    color: #f0f0f0;
    font-weight: bold;
    min-width: 120px;
}

.setting-item input[type="range"] {
    flex: 1;
    max-width: 150px;
}

.setting-item input[type="color"] {
    width: 40px;
    height: 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.setting-item select {
    background: #4a2c1a;
    color: #f0f0f0;
    border: 1px solid #d4af37;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
}

.settings-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.save-settings-btn, .reset-settings-btn {
    background: linear-gradient(45deg, #d4af37, #ffd700);
    border: none;
    color: #2c1810;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.save-settings-btn:hover, .reset-settings-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.reset-settings-btn {
    background: linear-gradient(45deg, #8b4513, #a0522d);
    color: #f0f0f0;
}

    @keyframes termAppear {
        from {
            opacity: 0;
            transform: translate(-50%, -50%) scale(0.5);
        }
        to {
            opacity: 1;
            transform: translate(-50%, -50%) scale(1);
        }
    }
    
    /* 画笔组样式 */
    .brush-group {
        position: relative;
    }
    
    .brush-dropdown {
        position: relative;
        display: inline-block;
    }
    
    .brush-dropdown-content {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        background: linear-gradient(145deg, #2c1810, #4a2c1a);
        border: 2px solid #d4af37;
        border-radius: 8px;
        min-width: 150px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
        z-index: 1000;
        margin-top: 5px;
    }
    
    .brush-dropdown-content.show {
        display: block;
    }
    
    .brush-option {
        padding: 10px 15px;
        color: #f0f0f0;
        cursor: pointer;
        transition: all 0.3s ease;
        border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    }
    
    .brush-option:last-child {
        border-bottom: none;
    }
    
    .brush-option:hover {
        background: linear-gradient(45deg, #8b4513, #d4af37);
        color: #2c1810;
    }
    
    .brush-option.active {
        background: linear-gradient(45deg, #d4af37, #ffd700);
        color: #2c1810;
        font-weight: bold;
    }
    
    .brush-size-control {
        display: none;
        flex-direction: column;
        gap: 5px;
        background: rgba(212, 175, 55, 0.1);
        padding: 8px 12px;
        border-radius: 8px;
        border: 1px solid rgba(212, 175, 55, 0.3);
        margin-top: 5px;
    }
    
    .brush-size-control.show {
        display: flex;
    }
    
    .brush-size-control label {
        font-size: 12px;
        color: #d4af37;
        white-space: nowrap;
    }
    
    .brush-size-control input[type="range"] {
        width: 100px;
    }
    
    .brush-size-control span {
        font-size: 12px;
        color: #d4af37;
        font-weight: bold;
        text-align: center;
    }
    
    /* 橡皮组样式 */
    .eraser-group {
        position: relative;
    }
    
    .eraser-dropdown {
        position: relative;
        display: inline-block;
    }
    
    .eraser-dropdown-content {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        background: linear-gradient(145deg, #2c1810, #4a2c1a);
        border: 2px solid #d4af37;
        border-radius: 8px;
        min-width: 120px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
        z-index: 1000;
        margin-top: 5px;
    }
    
    .eraser-dropdown-content.show {
        display: block;
    }
    
    .eraser-option {
        padding: 10px 15px;
        color: #f0f0f0;
        cursor: pointer;
        transition: all 0.3s ease;
        border-bottom: 1px solid rgba(212, 175, 55, 0.3);
        white-space: nowrap;
        min-width: 120px;
    }
    
    .eraser-option:last-child {
        border-bottom: none;
    }
    
    .eraser-option:hover {
        background: linear-gradient(45deg, #8b4513, #d4af37);
        color: #2c1810;
    }
    
    .eraser-option.active {
        background: linear-gradient(45deg, #d4af37, #ffd700);
        color: #2c1810;
        font-weight: bold;
    }
    
    .eraser-size-control {
        display: none;
        flex-direction: column;
        gap: 5px;
        background: rgba(255, 0, 0, 0.1);
        padding: 8px 12px;
        border-radius: 8px;
        border: 1px solid rgba(255, 0, 0, 0.3);
        margin-top: 5px;
    }
    
    .eraser-size-control.show {
        display: flex;
    }
    
    .eraser-size-control label {
        font-size: 12px;
        color: #ff6666;
        white-space: nowrap;
    }
    
    .eraser-size-control input[type="range"] {
        width: 100px;
    }
    
    .eraser-size-control span {
        font-size: 12px;
        color: #ff6666;
        font-weight: bold;
        text-align: center;
    }
    
    /* 形状工具样式 */
    .shape-group {
        position: relative;
        display: inline-block;
    }
    
    .shape-dropdown {
        position: relative;
        display: inline-block;
    }
    
    .shape-dropdown-content {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        background: linear-gradient(145deg, #2c1810, #4a2c1a);
        border: 2px solid #d4af37;
        border-radius: 8px;
        min-width: 120px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
        z-index: 1000;
        margin-top: 5px;
    }
    
    .shape-dropdown-content.show {
        display: block;
    }
    
    .shape-option {
        padding: 10px 15px;
        color: #f0f0f0;
        cursor: pointer;
        transition: all 0.3s ease;
        border-bottom: 1px solid rgba(212, 175, 55, 0.3);
        white-space: nowrap;
    }
    
    .shape-option:last-child {
        border-bottom: none;
    }
    
    .shape-option:hover {
        background: linear-gradient(45deg, #8b4513, #d4af37);
        color: #2c1810;
    }
    
    .shape-option.active {
        background: linear-gradient(45deg, #d4af37, #ffd700);
        color: #2c1810;
        font-weight: bold;
    }
    
    .shape-size-control {
        display: none;
        flex-direction: column;
        gap: 5px;
        background: rgba(0, 150, 255, 0.1);
        padding: 8px 12px;
        border-radius: 8px;
        border: 1px solid rgba(0, 150, 255, 0.3);
        margin-top: 5px;
    }
    
    .shape-size-control.show {
        display: flex;
    }
    
    .shape-size-control label {
        font-size: 12px;
        color: #66ccff;
        white-space: nowrap;
    }
    
    .shape-size-control input[type="range"] {
        width: 100px;
    }
    
    .shape-size-control span {
        font-size: 12px;
        color: #66ccff;
        font-weight: bold;
        text-align: center;
    }

@keyframes textAppear {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-5deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.1) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: scale(1.3) rotate(5deg);
    }
}

/* 文字特效样式 */
.text-effect {
    background: none !important;
    border: none !important;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .toolbar-center {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .tool-group {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: 200px;
    }
    
    .canvas-section {
        flex: 1;
    }
    
    #drawingCanvas {
        width: 100%;
        height: auto;
        max-width: 600px;
    }
}

/* 标签2 PPT特效样式 */
.label2-effect {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3000;
    pointer-events: none;
    opacity: 0;
    width: 100px;
    height: 100px;
    transition: all 2s ease-in-out;
}

.label2-effect.show {
    opacity: 1;
    width: 100vw;
    height: 100vh;
    transform: translate(-50%, -50%) rotate(-5deg);
}

.label2-effect img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.8);
}

/* 标签2特效动画 */
@keyframes label2Entrance {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.1) rotate(0deg);
    }
    10% {
        opacity: 0.2;
        transform: translate(-50%, -50%) scale(0.5) rotate(-0.5deg);
    }
    25% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(1.5) rotate(-1.25deg);
    }
    40% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(3) rotate(-2deg);
    }
    60% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(5.5) rotate(-3deg);
    }
    80% {
        opacity: 0.9;
        transform: translate(-50%, -50%) scale(8) rotate(-4deg);
    }
    95% {
        opacity: 0.95;
        transform: translate(-50%, -50%) scale(9.5) rotate(-4.75deg);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(10) rotate(-5deg);
    }
}

.label2-effect.animate {
    animation: label2Entrance 2s ease-in-out forwards;
}

/* 欢迎页面淡出动画 */
.welcome-page.fade-out {
    animation: welcomeFadeOut 2s ease-in-out forwards;
}

@keyframes welcomeFadeOut {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* 主界面淡入动画 */
.main-content.fade-in {
    animation: mainFadeIn 1s ease-in-out forwards;
}

@keyframes mainFadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* 电影回顾按钮样式 */
.movie-review-container {
    position: absolute;
    top: 30px;
    right: 30px;
    z-index: 1001;
}

.movie-review-btn {
    background: linear-gradient(145deg, rgba(44, 24, 16, 0.9), rgba(74, 44, 26, 0.9));
    border: 3px solid #d4af37;
    border-radius: 15px;
    padding: 15px 20px;
    color: #d4af37;
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 10px;
}

.movie-review-btn:hover {
    background: linear-gradient(145deg, rgba(74, 44, 26, 0.9), rgba(139, 69, 19, 0.9));
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(212, 175, 55, 0.6);
}

.movie-review-btn:active {
    transform: translateY(0);
}

.movie-icon {
    font-size: 1.3rem;
}

.movie-text {
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.6);
}

/* 电影回顾模态框样式 */
.movie-review-content {
    max-width: 1400px;
    width: 95%;
    max-height: 90vh;
}

.movie-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    padding: 30px 0;
    max-width: 1200px;
    margin: 0 auto;
}

.movie-poster-item {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.movie-title {
    color: #ffffff;
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 5px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 1.2em;
}

.movie-title:hover {
    color: #d4af37;
    transform: scale(1.05);
    text-shadow: 2px 2px 8px rgba(212, 175, 55, 0.6);
}

.movie-title::after {
    content: '💫 点击观看电影';
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: #d4af37;
    font-size: 0.7rem;
    padding: 6px 10px;
    border-radius: 6px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    text-align: center;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
}

.movie-poster-item::after {
    content: '💫 双击观看电影';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.9);
    color: #d4af37;
    font-size: 0.75rem;
    padding: 6px 10px;
    border-radius: 6px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    text-align: center;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.movie-poster-item:hover::after {
    opacity: 1;
}

.movie-title:hover::after {
    opacity: 1;
}

/* 电影链接样式 */
.movie-link {
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
    padding: 2px 4px;
    border-radius: 4px;
}

.movie-link:hover {
    color: #d4af37;
    text-decoration: none;
    transform: scale(1.05);
    text-shadow: 2px 2px 8px rgba(212, 175, 55, 0.6);
    background: rgba(212, 175, 55, 0.1);
}

.movie-link::before {
    content: '🎬';
    margin-right: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.movie-link:hover::before {
    opacity: 1;
}

.movie-link::after {
    content: '点击观看';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: #d4af37;
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
    z-index: 10;
}

.movie-link:hover::after {
    opacity: 1;
}

.movie-poster-container {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.movie-poster-container:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(212, 175, 55, 0.4);
}

.movie-poster {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.movie-poster-container:hover .movie-poster {
    transform: scale(1.05);
}

.movie-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 20px 15px 15px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.movie-poster-container:hover .movie-overlay {
    transform: translateY(0);
}

.movie-title {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 5px;
    color: #d4af37;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.6);
}

.movie-year {
    font-size: 0.9rem;
    color: #f4d03f;
    font-weight: 500;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 1.1em;
}

/* 电影详情弹窗样式 */
.movie-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.movie-detail-content {
    background: linear-gradient(145deg, #2c1810, #4a2c1a);
    border: 3px solid #d4af37;
    border-radius: 16px;
    padding: 30px;
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
    overflow: auto;
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.5);
    position: relative;
}

.movie-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #d4af37;
}

.movie-detail-header h2 {
    color: #d4af37;
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    margin: 0;
}

.movie-detail-close {
    background: none;
    border: none;
    color: #d4af37;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.movie-detail-close:hover {
    background: rgba(212, 175, 55, 0.2);
    transform: rotate(90deg);
}

.movie-detail-body {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    align-items: start;
}

.movie-detail-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.movie-detail-poster {
    width: 100%;
    max-width: 300px;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

/* 评分样式 */
.movie-ratings {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: linear-gradient(145deg, #3a1f15, #5a2f1f);
    border: 2px solid #d4af37;
    border-radius: 12px;
    padding: 20px;
}

.rating-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.rating-item:last-child {
    border-bottom: none;
}

.rating-label {
    color: #d4af37;
    font-weight: bold;
    font-size: 1rem;
    min-width: 80px;
}

.rating-score {
    color: #f4d03f;
    font-weight: bold;
    font-size: 1.1rem;
    min-width: 60px;
}

.rating-stars {
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.rating-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.rating-fill {
    height: 100%;
    background: linear-gradient(90deg, #f4d03f, #d4af37);
    border-radius: 4px;
    transition: width 0.8s ease;
}

.movie-detail-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.movie-basic-info, .movie-plot, .movie-awards {
    background: linear-gradient(145deg, #3a1f15, #5a2f1f);
    border: 2px solid #d4af37;
    border-radius: 12px;
    padding: 20px;
}

.movie-detail-info h3 {
    color: #d4af37;
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    margin-bottom: 15px;
    border-bottom: 2px solid #d4af37;
    padding-bottom: 8px;
}

.movie-detail-info p {
    color: #f0f0f0;
    margin-bottom: 12px;
    line-height: 1.6;
}

.movie-detail-info .year {
    color: #f4d03f;
    font-weight: bold;
    font-size: 1.1rem;
}

.movie-plot p {
    font-size: 1rem;
    text-align: justify;
    line-height: 1.8;
}

.movie-awards p {
    color: #f4d03f;
    font-style: italic;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .movie-review-container {
        top: 20px;
        right: 20px;
    }
    
    .movie-review-btn {
        padding: 12px 16px;
        font-size: 1rem;
    }
    
    .movie-gallery {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
        padding: 20px 0;
    }
    
    .movie-poster {
        height: 220px;
    }
    
    .movie-overlay {
        padding: 15px 10px 10px;
    }
    
    .movie-title {
        font-size: 0.9rem;
        cursor: pointer;
    }
    
    .movie-title:hover {
        color: #d4af37;
        transform: scale(1.02);
    }
    
    .movie-title::after {
        font-size: 0.6rem;
        padding: 4px 8px;
        top: -35px;
    }
    
    .movie-year {
        font-size: 0.8rem;
    }
    
    .movie-detail-body {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .movie-detail-left {
        gap: 15px;
    }
    
    .movie-detail-poster {
        max-width: 100%;
    }
    
    .movie-ratings {
        padding: 15px;
    }
    
    .rating-item {
        gap: 10px;
        padding: 8px 0;
    }
    
    .rating-label {
        min-width: 60px;
        font-size: 0.9rem;
    }
    
    .rating-score {
        min-width: 50px;
        font-size: 1rem;
    }
    
    .rating-stars {
        font-size: 1rem;
    }
    
    .movie-basic-info, .movie-plot, .movie-awards {
        padding: 15px;
    }
    
    .movie-detail-info h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .movie-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .movie-poster {
        height: 180px;
    }
    
    .movie-overlay {
        padding: 12px 8px 8px;
    }
    
    .movie-title {
        font-size: 0.8rem;
        cursor: pointer;
    }
    
    .movie-title:hover {
        color: #d4af37;
        transform: scale(1.01);
    }
    
    .movie-title::after {
        font-size: 0.5rem;
        padding: 3px 6px;
        top: -30px;
    }
    
    .movie-year {
        font-size: 0.7rem;
    }
}

/* 观看按钮样式 */
.movie-watch-btn {
    margin-top: 20px;
    text-align: center;
}

.watch-btn {
    background: linear-gradient(145deg, #d4af37, #ffd700);
    border: none;
    border-radius: 25px;
    padding: 12px 24px;
    color: #2c1810;
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.watch-btn:hover {
    background: linear-gradient(145deg, #ffd700, #d4af37);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6);
}

/* 响应式设计中的观看按钮 */
@media (max-width: 768px) {
    .watch-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .watch-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
}
